using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Geekees.App.HRAssistant.Core.Domain;

namespace Geekees.App.HRAssistant.DataInterface.Common
{
	public interface IDao<T, IdT>
	{
		T GetById( IdT id, bool shouldLock );
		List<T> GetAll();
		List<T> GetByExample( T exampleInstance, params string[] propertiesToExclude );
		T GetUniqueByExample( T exampleInstance, params string[] propertiesToExclude );
		T Save( T entity );
		T SaveOrUpdate( T entity );
		void Delete( T entity );
		void CommitChanges();
		List<T> Search( ISearchDef searchDef, int startRow, int maxRows, string[] asc, string[] desc, out int totalRows );
	}
}
